﻿

$(document).ready(function () {
    var nowDate = new Date();
    var str = nowDate.getFullYear() + "年" + (nowDate.getMonth() + 1) + "月" + nowDate.getDate() + "日";
    var time = nowDate.toLocaleTimeString();    //获取当前时间
    var weekday = new Array(7);
    weekday[0] = "星期日";
    weekday[1] = "星期一";
    weekday[2] = "星期二";
    weekday[3] = "星期三";
    weekday[4] = "星期四";
    weekday[5] = "星期五";
    weekday[6] = "星期六";
    //从 Date 对象返回一周中的某一天 (0 ~ 6)。
    var daofWeek = nowDate.getDay()
    $('#date').text("  " + str);
    $('#day').text("  " + weekday[daofWeek]);
    $('#time').text("  " + time);

    setInterval('RelashTime()', 50)//刷新时间
});
function RelashTime() {
    var nowDate = new Date();
    var time = nowDate.toLocaleTimeString();
    $('#time').text(time);
}

//输出天气
//MiniSite.Weather.print("Wealth");